<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWxError extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wx_errors', function (Blueprint $table) {
            $table->increments('id')->comment('自增ID');
            $table->integer('errcode')->comment('错误码');
            $table->string('errmsg', 200)->default('')->comment('客服帐号');
            $table->softDeletes();
            $table->timestamps();
            $table->index(['errcode','deleted_at'], 'idx_1');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wx_errors');
    }
}
